From: Florian Müllner Date: Thu, 23 Feb 2023 18:03:38 +0000 (+0100) Subject: status/bluetooth: Ignore devices when turned off X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~393^2^2~64 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=732d0980d890e3c4fa6cda520c63bab9532c4237;p=gnome-shell.git status/bluetooth: Ignore devices when turned off gnome-bluetooth clears the list of devices when the adapter goes away, but we cannot assume that that'll happen when powered down. We don't want to show a (potentially outdated) list of devices that cannot be interacted with in that case, so explicitly check for the active state when returning devices. Part-of: --- diff --git a/js/ui/status/bluetooth.js b/js/ui/status/bluetooth.js index ca250dd45..a5d6451ca 100644 --- a/js/ui/status/bluetooth.js +++ b/js/ui/status/bluetooth.js @@ -134,6 +134,10 @@ const BtClient = GObject.registerClass({ } *getDevices() { + // Ignore any lingering device references when turned off + if (!this.active) + return; + const deviceStore = this._client.get_devices(); for (let i = 0; i < deviceStore.get_n_items(); i++) {